<?php
$language = $_COOKIE['language'];
$yuyan = $_COOKIE['yuyan'];

if(empty($language) || empty($yuyan))
{
$language = 'en';
$yuyan = 'English';
}
?>
<?php $dianhua=dr_site_value('dianhua');?>
<?php $youxiang=dr_site_value('youxiang');?>
<?php $dizhi=dr_site_value('dizhi');?>
<?php $duoyuyan=dr_site_value('duoyuyan');?>
<?php $zhengshu=dr_site_value('zhengshu');?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>{usu_fanyi($meta_title, $language)}</title>
    <meta content="{usu_fanyi($meta_keywords, $language)}" name="keywords" />
    <meta content="{usu_fanyi($meta_description, $language)}" name="description" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link href="{HOME_THEME_PATH}pc/css/style.bundle.css" rel="stylesheet" type="text/css" />
    <link href="{THEME_PATH}assets/icon/css/icon.css" rel="stylesheet" type="text/css" />

    <!-- 系统懒人版js(所有自建模板引用) -->
    <script type="text/javascript">var is_mobile_cms = '{IS_MOBILE}';var web_dir = '{WEB_DIR}';</script>
    <script src="{LANG_PATH}lang.js" type="text/javascript"></script>
    <script src="{THEME_PATH}assets/global/plugins/jquery.min.js" type="text/javascript"></script>
    <script src="{THEME_PATH}assets/js/cms.js" type="text/javascript"></script>
    <!-- 系统懒人版js结束 -->

    <!--模板css-->
    <meta content="telephone=no" name="format-detection"><link rel="stylesheet" type="text/css" href="{HOME_THEME_PATH}pc/css/iconfont.css">
    <link rel="stylesheet" type="text/css" href="{HOME_THEME_PATH}pc/css/style.css">
    <link rel="stylesheet" type="text/css" href="{HOME_THEME_PATH}pc/css/style1.css">
    <!--模板js-->

    <!-- 多语言js -->
    <script type="text/javascript">
        function language(e,c){
            var cookies = document.cookie.split(";");
            for (var i = 0; i < cookies.length; i++) {
                var cookie = cookies[i];
                while (cookie.charAt(0) == " ") {
                    cookie = cookie.substring(1);
                }
                if (cookie.indexOf("=") != -1) {
                    var name = cookie.substring(0, cookie.indexOf("="));
                    document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";
                }
            }

            document.cookie ='language='+e+';path=/';
            document.cookie ='yuyan=' +c+ ';path=/';
            document.cookie ='language='+e+';path=/zh';
            location.reload();
        }
    </script>

   {SITE_TONGJI}
</head>
<body class="homepage">
<div class="main">
    <!-- HEADER START -->
    <header class="header-box">
        <div class="header-top">
            <div class="header-inner">
                <div class="header-contact">
                    <ul>
                        <li class="website-mailbox"><i class="iconfont">&#xe624;</i><a href="mailto:{$youxiang}" target="_blank">{$youxiang}</a></li>
                        <li class="website-phone"><i class="iconfont">&#xec76;</i><a href="tel:{$dianhua}" target="_blank">{$dianhua}</a></li>
                    </ul>
                </div>
                <div class="header-search">
                    <form name="formsearch"  action="{WEB_DIR}index.php" method="get">
                        <input type="hidden" name="s" value="api">
                        <input type="hidden" name="c" value="api">
                        <input type="hidden" name="m" value="search">
                        <input type="hidden" name="dir" id="dr_search_module_dir">
                        <div class="search-box">
                            <input class="input-text" name="keyword" id="keyword"  placeholder="{usu_fanyi('Search entire store here...', $language)}" type="text">
                            <button class="search-btn" ><i class="iconfont">&#xe6c9;</i></button>
                        </div>
                    </form>

                    <script>
                        // 这段js是用来执行搜索的
                        function dr_search_module_select(dir, name) {
                            $("#dr_search_module_dir").val("news");
                            $("#dr_search_module_name").html(name + ' <i class="fa fa-angle-down"></i>');
                        }
                        dr_search_module_select('{php echo MOD_DIR ? MOD_DIR : $top_search.dirname}', '{php echo MOD_DIR ? MODULE_NAME : $top_search.name}');
                    </script>

                </div>
                <div class="language">
                    <div class="cur">

                        <e  class="{$language}">{$yuyan}<i class="iconfont">&#xe635;</i></e>

                        <ul class="language-list">
                            <?php if ($duoyuyan) { $key=0; foreach ($duoyuyan as $v) { ?>
                            <li onclick="language('{$v[2]}','{$v[1]}')"><a href="#" title="{$v[1]}" class="{$v[2]}">{$v[1]}</a></li>
                            <?php  $key++; } } ?>
                        </ul>

                    </div>
                </div>
                <div class="clear"></div>
            </div>
        </div>
        <div class="header-middle" id="fixedMenu">
            <div class="header-inner">
                <div class="header-logo">
                    <div class="header-logo-box">
                        <a href="/"><img alt="{SITE_NAME}" src="{SITE_LOGO}"></a>
                    </div>
                </div>
                <!--<div class="company-motto">
                	<div class="company-motto-p"><p>Guaranteeing the highest quality products has always been our pursuit</p></div>
                </div>-->
                <nav class="main-nav" role="navigation">
                    <!-- Mobile menu toggle button (hamburger/x icon) -->
                    <input id="main-menu-state" type="checkbox">
                    <label class="main-menu-btn" for="main-menu-state">
                        <span class="main-menu-btn-icon"></span> Toggle main menu visibility
                    </label>
                    <!-- Sample menu definition -->
                    <ul id="main-menu" class="sm sm-blue">
                        <li  class="{if $indexc}current{/if}"><a href="/">{usu_fanyi("HOME", $language)}</a></li>
                        {category module=share pid=0}
                          {if $t.child}
                          <li  class="{if IS_SHARE && $catid && in_array($catid, $t.catids)}current{/if}"><a href="{$t.url}">{usu_fanyi($t.name, $language)}</a>
                          <ul>
                              {category module=share pid=$t.id return=t1}
                              {if $t1.child}
                              <li><a href="{$t1.url}">{usu_fanyi($t1.name, $language)}</a>
                              <ul>
                                  {category module=share pid=$t1.id return=t2}
                                  <li><a href="{$t2.url}">{usu_fanyi($t2.name, $language)}</a>
                                      {/category}
                              </ul>
                              </li>
                              {else}
                              <li><a  href="{$t1.url}">{usu_fanyi($t1.name, $language)}</a></li>
                              {/if}
                              {/category}
                          </ul>
                          </li>
                        {else}
                        <li class="{if IS_SHARE && $catid && in_array($catid, $t.catids)}current{/if}"><a href="{$t.url}">{usu_fanyi($t.name, $language)}</a></li>
                          {/if}
                        {/category}
                    </ul>
                </nav>

            </div>
        </div>


    </header>
    <!-- HEADER END -->